A theory of the gain and threshold current of a semiconductor quantum dot (QD) laser has been developed which takes account of the line broadening caused by fluctuations in QD size. Expressions for the threshold current versus the surface density of QDs. QD size dispersion and total losses have been obtained in explicit form. Optimization of the structure has been carried out, aimed at minimizing the threshold current density. The characteristic temperature of QD laser has been calculated considering carrier recombination in the optical confinement layer and violation of the charge neutrality in QDs.